Poor Man's Genericity for Java

نویسندگان

  • Boris Bokowski
  • Markus Dahm
چکیده

A number of proposals have been made as to how Java can be changed to support parameterized types. We present a new proposal that does not try to provide more powerful constructs or cleaner semantics, but instead minimizes the changes that need to be made to existing Java compilers. In particular, we found that changing only one method in Sun's Java compiler already results in a reasonable implementation of parameterized types, which we call "Poor Man's Genericity" (PMG). We have implemented our solution based on simple byte{code transformations both at compile{time and at load{time. The paper explains how our solution works, and compares it to other proposals. We also describe how the drawbacks of our approach can be overcome by making additional, but minimal changes to an existing Java compiler.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Speeding up the Java Tm Serialisation Framework through Partial Evaluation

Framework-based Object-Oriented applications are not as eecient as they could be. This results from the high-genericity of frameworks. However, once the framework is instantiated, part of this genericity can be removed. This is for instance the case when gener-icity is obtained through the use of reeection. This paper takes the Java Serialization framework as a typical example and shows how par...

متن کامل

Genericity in Object-Oriented Programming Languages

Genericity is one of the most powerful means for obtaining flexibility in programming with statically typed programming languages. Genericity constructs take on very different forms, the choice of which has a considerable impact on expressiveness, modularity, static checkability and efficiency properties of programs. This tutorial presents an in-depth discussion of the history, origins, and str...

متن کامل

Genericity in Java with Virtual Types

This paper suggests virtual types for Java, a language mechanism which subsumes parameterized classes, while also integrating more naturally with Java’s object model. The same basic mechanism is also known as virtual patterns in Beta and as generics in Ada95. We discuss various issues in the Java type system, issues with inheritance and genericity in general, and give a specific suggestion as t...

متن کامل

Genja - A New Proposal for Parameterised Types in Java

Recent proposals for adding parameterised types to Java have left a number of important practical issues undiscussed. In this paper we present the language Genja which is a new generic extension of Java oriented towards practical support for generic collection types. We discuss design alternatives related to extending the power of unconstrained genericity, solving the weaknesses of constrained ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1998